Redux Thunk
$ yarn add redux-thunk
非同期処理
を行う.
store
に対して
applyMiddleware
を行う.
code:store/intex.js
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
//略
export const store = createStore(reducer, applyMiddleware(thunk));